package com.cs410.collabwriting.junit.tools;

import static org.junit.Assert.*;

import org.junit.After;
import org.junit.AfterClass;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.TestName;

import com.cs410.collabwriting.tools.LogManager;

public class LogManagerTest {

	@Rule
	public TestName m_testName = new TestName();
	
	@BeforeClass
	public static void setUpBeforeClass() throws Exception {
		LogManager.logInfo("[JUnitTest] -- Starting JUnit Tests for LogManager" );
	}

	@AfterClass
	public static void tearDownAfterClass() throws Exception {
		LogManager.logInfo("[JUnitTest] -- Finished JUnit Tests for LogManager" );
	}

	@Before
	public void setUp() throws Exception {
		LogManager.logInfo("[JUnitTest] -- Starting Test : " + m_testName.getMethodName() );
	}

	@After
	public void tearDown() throws Exception {
		LogManager.logInfo("[JUnitTest] -- Finished Test : " + m_testName.getMethodName() );
	}

	@Test
	public void basicLogAllMessage() {
		LogManager.logDebug( m_testName.getMethodName() , LogManager.LOG_LEVEL_1 );
		LogManager.logError( m_testName.getMethodName() );
		LogManager.logInfo( m_testName.getMethodName() );
		LogManager.logWarning( m_testName.getMethodName() );
	}

}
